﻿using System;

namespace NTypeClasses
{
	/// <summary>
	/// Marks higher-kind types. 'index&lt;'args&gt;
	/// </summary>
	[AttributeUsage(AttributeTargets.GenericParameter)]
	public class TyparAttribute: Attribute
	{
		readonly int index;
		readonly int[] args;

		/// <summary>
		/// Creates an instance of TyparAttribute 'index&lt;'args&gt;
		/// </summary>
		/// <param name="index">Index of type variable</param>
		/// <param name="args">List of type arguments</param>
		public TyparAttribute(int index, params int[] args)
		{
			this.index = index;
			this.args = (int[])args.Clone();
		}

		public int Index { get { return index; } }
		public int[] Args { get { return (int[])args.Clone(); } }
	}
}
